﻿using Loki.IoC;
using Loki.IoC.Registration;
using Luna.Data.Common;

namespace Luna.Data
{
    public class CommonDataInstaller : LokiContextInstaller
    {
        public override void Install(IObjectContext context)
        {
            context.Register(Element.Entity<IReferenceData, ReferenceData>());
            context.Register(Element.For(typeof(ReferenceDataMapper<>)));

            context.Register(Element.Entity<ISearchData, SearchData>());
            context.Register(Element.For<SearchDataMapper>());

            context.Register(Element.Entity<IGeolocalisationData, GeolocalisationData>());
            context.Register(Element.For<GeolocalisationDataMapper>());

            context.Register(Element.Service<ISearchProvider, SearchProvider>());
        }
    }
}